package com.zyp.iterator;

import java.util.ArrayList;
import java.util.List;

public class TestIterator {

	public static void main(String[] args) {
		List<Object> list=new ArrayList<Object>();
		list.add("a");
		list.add("b");
		list.add("c");
		MyContainer con=new ConcreateContainer(list);
		MyIterator myIterator = con.iterator();
		while(myIterator.hasNext()){
			String o = (String) myIterator.next();
			System.out.println(o);
		}
		
		
	}
	
}
